package org.rednebula.framework.core.log;

import org.apache.log4j.Level;



public class Log4jLog extends Log {

	org.apache.log4j.Logger log;

	public Log4jLog(org.apache.log4j.Logger log) {
		this.log = log;
	}

	public void error(String msg) {
		log.error(msg);
	}

	public void error(String msg, Throwable exception) {
		log.error(msg, exception);
	}

	public boolean isInfoEnabled() {
		return log.isInfoEnabled();
	}

	public void info(String msg) {
		if (isInfoEnabled())
			log.info(msg);
	}

	public void info(String msg, Throwable exception) {
		if (isInfoEnabled())
			log.info(msg, exception);
	}

	public boolean isDebugEnabled() {
		return log.isDebugEnabled();
	}

	public void debug(String msg) {
		if (isDebugEnabled())
			log.debug(msg);
	}

	public void debug(String msg, Throwable exception) {
		if (isDebugEnabled())
			log.debug(msg, exception);
	}

	public boolean isTraceEnabled() {
		return log.isTraceEnabled();
	}

	public void trace(String msg) {
		if (isTraceEnabled())
			log.trace(msg);
	}

	public void trace(String msg, Throwable exception) {
		if (isTraceEnabled())
			log.trace(msg, exception);
	}

	public boolean isWarnEnabled() {
		return log.isEnabledFor(Level.WARN);
	}

	public void warn(String msg) {
		if (isWarnEnabled())
			log.warn(msg);
	}

	public void warn(String msg, Throwable exception) {
		if (isWarnEnabled())
			log.warn(msg, exception);
	}

}
